//============================================================================
// Name        : plug.cpp
// Author      : song
// Version     :
// Copyright   : Your copyright notice
//============================================================================


#include <stdio.h>
#include <string.h>

#include <signal.h>
#include <iostream>

 #include <string.h>
#include <vector>

#include <iostream>
#include "cmd.h"
#include "IpPort.h"
#include "Parse.h"
#include "Plug.h"

using namespace std;

#define DENUM 4


Plug *pPlug;

bool bKilled=false;
void hand_sigint(int i)
{
	bKilled=true;
}



void hand_sigpipe(int i)
{
	static int j=0;
	printf("---------------------------------------------------j=%d\n",j++);

}

int main(int argc,char *argv[]) {

	signal(SIGINT, hand_sigint);
	signal(SIGPIPE, hand_sigpipe);

	IpPort::Init();

	pPlug = new Plug();
	pPlug->StartWork();

	pause();
	return 0;

	while(bKilled==false)
		sleep(1);

	printf("release memory\n");
	if(pPlug)
		delete pPlug;

	return 0;

}
